<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>可视尺寸的改变</title>
</head>
<body>
<script>
    //窗口尺寸发生改变 做以下动作
    window.onresize = function () {
        console.log('窗口的尺寸发生了改变');
    }
</script>
</body>
</html>